<?php
$data=$HTTP_RAW_POST_DATA;
$nom_file = $_GET["filename"];
$myFile = fopen("../palettes/".$nom_file, "w");  
fputs($myFile, $data);
fclose($myFile);
if ($_GET["overwrite"] == "no")
{
$myFile = fopen("../palettes/list_palettes.txt", "a+");  
fputs($myFile,$nom_file.";");
fclose($myFile);
}

?>